package main.mvc;

import java.util.ArrayList;
import java.util.List;

import com.spring.annotation.entity.Table;
import com.spring.bean.blog.Blog;
import com.spring.bean.blog.BlogComment;
import com.spring.bean.gf.GfSort;
import com.spring.bean.person.PersonAttent;
import com.spring.bean.person.PersonBasic;
import com.spring.bean.person.PersonOther;

public class Main {
	
	public static void main(String args[]){
		List<Class> clses = new ArrayList<Class>();
		
		/* person */
//		clses.add(PersonAttent.class);
//		clses.add(PersonBasic.class);
//		clses.add(PersonOther.class);
		
		/* blog */
//		clses.add(Blog.class);
//		clses.add(BlogComment.class);
		
		/* gf */
		clses.add(GfSort.class);
		
		for(Class cls : clses){
			Table table = (Table) cls.getAnnotation(Table.class);
			String tableName = table.name();
			DaoInterfaceBuilder.buildDao(tableName);
			DaoBuilder.buildDao(tableName, cls);
			ServiceIntefaceBuilder.buildService(tableName);
			ServiceBuilder.buildService(tableName);
		}
	}
	
	
}
